<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"  %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
   <%@include file="/view/resource.jsp" %>
  </head>
  <body class="easyui-layout">
     <!-- DataList  -->
	 <div region="center" border="false" >
     	<table id="data-list" ></table>
     </div>
    
	<div id="edit-win"  class="easyui-dialog"  data-options="closed:true,iconCls:'icon-save',modal:true" style="width:500px;height:450px;">
          <form action="<%=request.getContextPath() %>/tostPjTeammemberinfo/save.do" method="post" name="addPerson" target="ifm">
          	<br/>
          	 &nbsp;&nbsp;<span> 选择添加项目:</span>&nbsp;&nbsp;<select name="pjId" id="pjId">
          	 <c:forEach items="${pjls}" var="pjls">  <option value="${pjls.id }">${pjls.pjProjectname }</option></c:forEach>	 </select><br><br/> &nbsp;&nbsp;
          	<span> 选择添加的人:</span>&nbsp;&nbsp;<select name="hrId" id="hrId">
          	 <c:forEach items="${bsls}" var="bsls"><option value="${bsls.id }">${bsls.hrName }</option></c:forEach>	 </select>
          	 <input type="hidden" name="hrName" id="hrName">
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <span>岗位名称:</span>   
            <span id="selectpost">   </span><br><br>  &nbsp;&nbsp; 
            <input name="hpoId" id="hpoId" type="hidden">
            <input name="hpoName" id="hpoName" type="hidden">
           <span>加入时间:</span>   
            <input  id="ptmEntertime" class="easyui-datebox"  data-options="required:true"  name="ptmEntertime" style="width:150px; border: 1px solid #ccc"> &nbsp;&nbsp;&nbsp;&nbsp;  
         <span>离开时间:</span>    
            <input  id="ptmLeavetime" class="easyui-datebox"  name="ptmLeavetime" style="width:150px; border: 1px solid #ccc">&nbsp;&nbsp;&nbsp;&nbsp;<br><br> &nbsp;&nbsp;
          <span>当前状态:</span>  
            <input  id="ptmStatus"   data-options="required:true"  name="ptmStatus" style="width:150px; border: 1px solid #ccc"> &nbsp;&nbsp;&nbsp;&nbsp;
          <span>项目服务天数:</span>   
            <input  id="ptmServerday" class="easyui-validatebox" data-options="required:false"  name="ptmServerday" style="width:125px; border: 1px solid #ccc"> <br><br>&nbsp;&nbsp;   
           <span>项目在职月份:</span>  
            <input  id="ptmMonth" class="easyui-validatebox" data-options="required:false"  name="ptmMonth" style="width:125px; border: 1px solid #ccc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   
          <span>加入次数:</span>   
            <input  id="ptmNumber" class="easyui-validatebox" data-options="required:false" name="ptmNumber" style="width:150px; border: 1px solid #ccc"><br><br> &nbsp;&nbsp;  
           <br>
           </form>
            <iframe id='ifm' name='ifm' style="visibility:hidden;display:none"></iframe>
        </div>
  <script>
$(function() {  
	//查询当前状态
     	$("#ptmStatus").combobox({  
		url:urls['msUrl']+"/tostPjLookDetailsinfo/querynowstat.do",
		cache: false,  // queryPhoname
	    panelHeight: 'auto',//自动高度适合
		dataType:'json',
		valueField:'id',
		textField:'paName',
		multiple:false,
		formatter:function(result){
			var s= "<span><input type='hidden' class='selectId'  id='selectId_"+result.paValue+"' >"+result.paName+"<span>";
	   		return s;
	   	},
	   	onSelect:function(result){
	   		$("#selectId_"+result.paValue).attr("checked", true);
	   	},
	   	onUnselect:function(result){
	   		$("#selectId_"+result.paValue).attr("checked", false);
	   	}
	});
	});
   function subteam(){
    var obj = document.getElementById("hrId");
	var index = obj.selectedIndex; // 选中索引
	var text = obj.options[index].text;
	document.getElementById("hrName").value=text;
     obj = document.getElementById("selehponame");
	 index = obj.selectedIndex; // 选中索引
	 text = obj.options[index].text;
	 document.getElementById("hpoName").value=text;
	 document.getElementById("hpoId").value=obj.options[index].value;
     document.addPerson.submit();
    }
  </script>      
        
  <script type="text/javascript" src="<%=basePath%>/osjs/project/TostPjTeamcontrol.js"></script>
  </body>
</html>